<script setup>
import { ref, defineOptions } from 'vue'
import { bigGod } from '@/api/getAxios'

//本期大神
const big_god = ref({})
bigGod().then((res) => {
    // console.log(res);
    big_god.value = res.data.data.list
    // console.log(smallcompile.value);
})

</script>
<template>
    <div class="big_god">
        <h1 class="recommend">
            <span>本期大神</span>
            <span class="iconfont icon-tiaozhuan jump" @click="$router.push('/AuthorPage')"></span>
        </h1>
        <ul>
            <li v-for="item in big_god" @click="$router.push(`/AuthorPage/AuthorFormate?uid=${item.authorId}`)">
                <div class="info">
                    <h2>{{ item.authorName }}</h2>
                    <p class="intro">{{ item.introduce }}</p>
                    <p class="story">代表作:<br />
                        <span>《{{ item.list[0].storyName }}》</span>
                    </p>
                </div>
                <div class="img">
                    <img :src="item.faceUrl" alt="">
                </div>
            </li>
        </ul>
    </div>
</template>

<style scoped lang='less'>
.big_god {
    height: 66vw;
    background-color: #fff;
    margin-bottom: 15px;

    h1 {
        text-align: center;
        font-weight: bold;
        font-size: 22px;
        padding: 20px 0px;
        position: relative;

        span.jump {
            position: absolute;
            right: 0;
            font-size: 26px;
            margin-right: 20px;
        }
    }

    ul {
        li {
            display: flex;

            .info {
                text-align: center;
                margin-left: 20px;
                display: flex;
                justify-content: space-evenly;
                flex-direction: column;

                h2 {
                    font-size: 18px;
                    text-align: left;
                }

                .intro {
                    display: -webkit-box;
                    text-align: center;
                    -webkit-line-clamp: 3;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    color: #939296;
                    font-size: 14px;
                    text-align: left;
                }

                .story {
                    color: #939296;
                    font-size: 12px;
                    text-align: left;

                    span {
                        font-size: 14px;
                        color: #000;
                        display: -webkit-box;
                        text-align: center;
                        -webkit-line-clamp: 1;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        font-size: 14px;
                        text-align: left;
                    }
                }
            }

            .img {
                margin-right: 10px;
                flex-grow: 1;
                width: 230vw;
                height: 42vw;
                border-radius: 10px;

                img {
                    border-radius: 10px;

                    width: 100%;
                    height: 100%;
                }
            }
        }
    }
}
</style>